{{- /*
  Usage: `example [args]`

  `args` are optional and can be one of the following:
    id: the `div`'s id - default: ""
    class: any extra class(es) to be added to the `div` - default ""
    show_preview: if the preview should be output in the HTML - default: `true`
    show_markup: if the markup should be output in the HTML - default: `true`
*/ -}}

{{- $lang := .Get "lang" | default "html" -}}
{{- $show_preview := .Get "show_preview" | default true -}}
{{- $show_markup := .Get "show_markup" | default true -}}
{{- $show_dark := .Get "show_dark" | default false -}}
{{- $disable_init_js := .Get "disable_init_js" | default false -}}
{{- $input := .Inner -}}
{{- $iframeHeight := .Get "iframeHeight" | default false -}}
{{- $iframeMaxHeight := .Get "iframeMaxHeight" | default false -}}
{{- $class := .Get "class" | default false -}}
{{- $bodyClass := .Get "bodyClass" | default false -}}
{{- $id := .Get "id" | default false -}}

{{- $skeletonPlaceholdersMarkup := "<div class='max-w-lg mx-auto'> <div role='status' class='my-7 animate-pulse'> <div class='h-2.5 bg-gray-300 rounded-full dark:bg-gray-700 w-48 mb-4'></div><div class='h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[460px] mb-2.5'></div><div class='h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[500px] mb-2.5'></div><div class='h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[450px] mb-2.5'></div><div class='h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[380px] mb-2.5'></div><div class='h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[460px]'></div><span class='sr-only'>Loading...</span> </div><div role='status' class='max-w-lg mb-7 animate-pulse'> <div class='flex items-center justify-center w-full h-48 bg-gray-300 rounded dark:bg-gray-700'> <svg class='w-12 h-12 text-gray-200' xmlns='http://www.w3.org/2000/svg' aria-hidden='true' fill='currentColor' viewBox='0 0 640 512'><path d='M480 80C480 35.82 515.8 0 560 0C604.2 0 640 35.82 640 80C640 124.2 604.2 160 560 160C515.8 160 480 124.2 480 80zM0 456.1C0 445.6 2.964 435.3 8.551 426.4L225.3 81.01C231.9 70.42 243.5 64 256 64C268.5 64 280.1 70.42 286.8 81.01L412.7 281.7L460.9 202.7C464.1 196.1 472.2 192 480 192C487.8 192 495 196.1 499.1 202.7L631.1 419.1C636.9 428.6 640 439.7 640 450.9C640 484.6 612.6 512 578.9 512H55.91C25.03 512 .0006 486.1 .0006 456.1L0 456.1z'/></svg> </div><span class='sr-only'>Loading...</span> </div><div role='status' class='my-6 animate-pulse'> <div class='h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[460px] mb-2.5'></div><div class='h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[450px] mb-2.5'></div><div class='h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[460px] mb-2.5'></div><div class='h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[500px] mb-2.5'></div><div class='h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[450px] mb-2.5'></div><div class='h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[380px] mb-2.5'></div><div class='h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[460px]'></div><span class='sr-only'>Loading...</span> </div><div role='status' class='my-6 animate-pulse'> <div class='h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[460px] mb-2.5'></div><div class='h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[450px] mb-2.5'></div><div class='h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[460px] mb-2.5'></div><div class='h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[500px] mb-2.5'></div><span class='sr-only'>Loading...</span> </div><div role='status' class='mb-6 mt-7 animate-pulse'> <div class='h-2.5 bg-gray-300 rounded-full dark:bg-gray-700 w-48 mb-4'></div><div class='h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[460px] mb-2.5'></div><div class='h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[450px] mb-2.5'></div><div class='h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[460px] mb-2.5'></div><div class='h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[500px] mb-2.5'></div><div class='h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[450px] mb-2.5'></div><div class='h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[380px] mb-2.5'></div><div class='h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[460px] mb-2.5'></div><div class='h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[500px] mb-2.5'></div><div class='h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[460px]'></div><span class='sr-only'>Loading...</span> </div><div role='status' class='my-6 animate-pulse'> <div class='h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[460px] mb-2.5'></div><div class='h-2 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[450px] mb-2.5'></div><span class='sr-only'>Loading...</span> </div></div>" -}}
{{- $skeletonPlaceholders := .Get "skeletonPlaceholders" | default false -}}

{{ $javascript := .Get "javascript" | default "" | safeJS }}

{{- $initDatepicker := .Get "initDatepicker" | default false -}}
{{- $charts := .Get "charts" | default false -}}

<div class="mt-8 code-example">
  
  {{- if eq $show_preview true -}}
  
  <div class="w-full p-4 border border-gray-200 bg-gray-50 rounded-t-xl dark:border-gray-600 dark:bg-gray-700">
    <div class="grid grid-cols-3">
      {{ with .Get "github" }}
      <div class="col-span-2 sm:col-span-1">
        <a href="https://github.com/themesberg/flowbite/blob/main/content/{{ . }}" rel="noopener nofollow noreferrer" class="inline-flex items-center justify-center h-9 mr-3 px-3 text-xs font-medium text-gray-900 bg-white border border-gray-200 rounded-lg focus:outline-none hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-2 focus:ring-gray-300 dark:focus:ring-gray-500 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700">
          <svg class="w-3.5 h-3.5 mr-2" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20">
            <path fill-rule="evenodd" d="M10 .333A9.911 9.911 0 0 0 6.866 19.65c.5.092.678-.215.678-.477 0-.237-.01-1.017-.014-1.845-2.757.6-3.338-1.169-3.338-1.169a2.627 2.627 0 0 0-1.1-1.451c-.9-.615.07-.6.07-.6a2.084 2.084 0 0 1 1.518 1.021 2.11 2.11 0 0 0 2.884.823c.044-.503.268-.973.63-1.325-2.2-.25-4.516-1.1-4.516-4.9A3.832 3.832 0 0 1 4.7 7.068a3.56 3.56 0 0 1 .095-2.623s.832-.266 2.726 1.016a9.409 9.409 0 0 1 4.962 0c1.89-1.282 2.717-1.016 2.717-1.016.366.83.402 1.768.1 2.623a3.827 3.827 0 0 1 1.02 2.659c0 3.807-2.319 4.644-4.525 4.889a2.366 2.366 0 0 1 .673 1.834c0 1.326-.012 2.394-.012 2.72 0 .263.18.572.681.475A9.911 9.911 0 0 0 10 .333Z" clip-rule="evenodd"/>
          </svg> Edit on GitHub
        </a>
      </div>
      {{ end }}
      <div class="items-center justify-center hidden col-span-1 space-x-2 sm:flex">
        <button {{ if $id }} data-tooltip-target="{{ $id }}-full-screen-tooltip"{{ end }} class="flex items-center justify-center w-9 h-9 text-xs font-medium text-gray-700 bg-white border border-gray-200 rounded-lg toggle-full-view hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-2 focus:ring-gray-300 dark:focus:ring-gray-500 dark:bg-gray-800 focus:outline-none dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700"><span class="sr-only">Toggle full view</span><svg class="w-3.5 h-3.5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20">
          <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 14v4m-4 1h8M1 10h18M2 1h16a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1Z"/>
        </svg></button>
        {{ if $id }}
          <div id="{{ $id }}-full-screen-tooltip" role="tooltip" class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white transition-opacity duration-300 bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700">
              Toggle full screen
              <div class="tooltip-arrow" data-popper-arrow></div>
          </div>
        {{ end }}
        <button {{ if $id }} data-tooltip-target="{{ $id }}-tablet-tooltip"{{ end }} class="flex items-center justify-center w-9 h-9 text-xs font-medium text-gray-700 bg-white border border-gray-200 rounded-lg toggle-tablet-view hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-2 focus:ring-gray-300 dark:focus:ring-gray-500 dark:bg-gray-800 focus:outline-none dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700"><span class="sr-only">Toggle tablet view</span><svg class="w-3.5 h-3.5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 18 20">
          <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7.5 16.5h3M2 1h14a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1Z"/>
        </svg></button>
        {{ if $id }}
          <div id="{{ $id }}-tablet-tooltip" role="tooltip" class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white transition-opacity duration-300 bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700">
              Toggle tablet view
              <div class="tooltip-arrow" data-popper-arrow></div>
          </div>
        {{ end }}
        <button {{ if $id }} data-tooltip-target="{{ $id }}-mobile-tooltip"{{ end }} class="flex items-center justify-center w-9 h-9 text-xs font-medium text-gray-700 bg-white border border-gray-200 rounded-lg toggle-mobile-view hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-2 focus:ring-gray-300 dark:focus:ring-gray-500 dark:bg-gray-800 focus:outline-none dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700"><span class="sr-only">Toggle mobile view</span><svg class="w-3.5 h-3.5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 20">
          <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M1 14h12M1 4h12M6.5 16.5h1M2 1h10a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1Z"/>
        </svg></button>
        {{ if $id }}
        <div id="{{ $id }}-mobile-tooltip" role="tooltip" class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white transition-opacity duration-300 bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700">
            Toggle mobile view
            <div class="tooltip-arrow" data-popper-arrow></div>
        </div>
      {{ end }}
      </div>
      <div class="flex justify-end col-span-1">  
        <button {{ if $id }} data-tooltip-target="{{ $id }}-toggle-rtl"{{ end }} data-toggle-direction="ltr" type="button" class="toggle-rtl flex items-center w-9 h-9 mr-3 justify-center text-xs font-medium text-gray-700 bg-white border border-gray-200 rounded-lg hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-2 focus:ring-gray-300 dark:focus:ring-gray-500 dark:bg-gray-800 focus:outline-none dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700">
          RTL
        </button> 
        <div id="{{ $id }}-toggle-rtl" role="tooltip" class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white transition-opacity duration-300 bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700">
            <span class="tooltip-text">Toggle RTL mode</span>
            <div class="tooltip-arrow" data-popper-arrow></div>
        </div>
        {{- if eq $show_dark true -}}
          <button {{ if $id }} data-tooltip-target="{{ $id }}-toggle-dark-mode-tooltip"{{ end }} type="button" data-toggle-dark="light" class="flex items-center w-9 h-9 justify-center text-xs font-medium text-gray-700 bg-white border border-gray-200 rounded-lg toggle-dark-state-example hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-2 focus:ring-gray-300 dark:focus:ring-gray-500 dark:bg-gray-800 focus:outline-none dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700">
            <svg data-toggle-icon="moon" class="w-3.5 h-3.5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 18 20">
              <path d="M17.8 13.75a1 1 0 0 0-.859-.5A7.488 7.488 0 0 1 10.52 2a1 1 0 0 0 0-.969A1.035 1.035 0 0 0 9.687.5h-.113a9.5 9.5 0 1 0 8.222 14.247 1 1 0 0 0 .004-.997Z"/>
            </svg>
            <svg data-toggle-icon="sun" class="hidden w-3.5 h-3.5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20">
              <path d="M10 15a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm0-11a1 1 0 0 0 1-1V1a1 1 0 0 0-2 0v2a1 1 0 0 0 1 1Zm0 12a1 1 0 0 0-1 1v2a1 1 0 1 0 2 0v-2a1 1 0 0 0-1-1ZM4.343 5.757a1 1 0 0 0 1.414-1.414L4.343 2.929a1 1 0 0 0-1.414 1.414l1.414 1.414Zm11.314 8.486a1 1 0 0 0-1.414 1.414l1.414 1.414a1 1 0 0 0 1.414-1.414l-1.414-1.414ZM4 10a1 1 0 0 0-1-1H1a1 1 0 0 0 0 2h2a1 1 0 0 0 1-1Zm15-1h-2a1 1 0 1 0 0 2h2a1 1 0 0 0 0-2ZM4.343 14.243l-1.414 1.414a1 1 0 1 0 1.414 1.414l1.414-1.414a1 1 0 0 0-1.414-1.414ZM14.95 6.05a1 1 0 0 0 .707-.293l1.414-1.414a1 1 0 1 0-1.414-1.414l-1.414 1.414a1 1 0 0 0 .707 1.707Z"/>
            </svg>
            <span class="sr-only">Toggle dark/light mode</span>
          </button>
          {{ if $id }}
          <div id="{{ $id }}-toggle-dark-mode-tooltip" role="tooltip" class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white transition-opacity duration-300 bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700">
              <span class="tooltip-text">Toggle dark mode</span>
              <div class="tooltip-arrow" data-popper-arrow></div>
          </div>
          {{ end }}
        {{- end -}}
      </div>
    </div>
  </div>

  <div class="code-preview-wrapper">
    <div{{ with .Get "id" }} id="{{ . }}"{{ end }} class="flex p-0 bg-white border-gray-200 bg-gradient-to-r code-preview dark:bg-gray-900 border-x dark:border-gray-600">
      <div class="w-full code-responsive-wrapper">
        <iframe {{ if $id }}title="{{ replace $id "-" " "}}"{{ end }} class="w-full h-0 mx-auto bg-white dark:bg-gray-900 iframe-code" {{ if $iframeMaxHeight }}style='max-height: {{  sub (int $iframeMaxHeight) 40 }}px'{{ end }} srcdoc="<!DOCTYPE html><html lang='en'><head><meta charset='UTF-8'><meta name='viewport' content='width=device-width, initial-scale=1.0'><link rel='preconnect' href='https://fonts.googleapis.com'><link rel='preconnect' href='https://fonts.gstatic.com' crossorigin><link href='https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap' rel='stylesheet'><link rel='stylesheet' href='{{ .Site.BaseURL }}flowbite.css?v=2.3.0a'></head><body {{ if $iframeHeight }}style='height: {{  sub (int $iframeHeight) 40 }}px'{{ end }} class='p-5 bg-white dark:bg-gray-900 antialiased {{ if $bodyClass }}{{ $bodyClass }}{{ end }}'><div id='exampleWrapper' class='{{ if $class }}{{ $class }}{{ end }}'>{{- $input | safeHTMLAttr -}}{{ if $skeletonPlaceholders }}{{ $skeletonPlaceholdersMarkup }}{{ end }}</div><script src='{{ .Site.BaseURL }}flowbite.min.js'></script><script src='{{ .Site.BaseURL }}datepicker.min.js'></script>{{ if $charts }}<script src='https://cdn.jsdelivr.net/npm/apexcharts'></script>{{ end }}<script>window.onload = function () { const anchorTags = document.querySelectorAll('a'); anchorTags.forEach(function(a){a.addEventListener('click', function(ev){ev.preventDefault();})}); {{ if not $disable_init_js }} const dropdownEl = document.querySelector('[data-dropdown-toggle]'); if (dropdownEl) {dropdownEl.click();} const modalEl = document.querySelector('[data-modal-toggle]'); if(modalEl) {modalEl.click(); } {{ if $initDatepicker }} const datepickerEl = document.querySelector('[datepicker]'); if (datepickerEl) { datepickerEl.focus({preventScroll: true}); } {{ end }} const dateRangePickerEl = document.querySelector('[data-rangepicker] input'); if (dateRangePickerEl) { dateRangePickerEl.focus(); } const drawerEl = document.querySelector('[data-drawer-show]'); if (drawerEl) { drawerEl.click(); } {{ end }} {{ if $javascript }} {{ $javascript }} {{ end }} }</script></body></html>" frameborder="0"></iframe>
        <div class="flex items-center justify-center w-full p-5 bg-white dark:bg-gray-900" data-component-loader>
          <div role="status">
            <svg aria-hidden="true" class="w-8 h-8 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
                <path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="currentColor"/>
                <path d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z" fill="currentFill"/>
            </svg>
            <span class="sr-only">Loading...</span>
        </div>
      </div>
      </div>
    </div>
  </div>
  {{- end -}}

  {{- if eq $show_markup true -}}
    {{- $content := replaceRE `<svg class="bd\-placeholder\-img(?:\-lg)?(?: *?bd\-placeholder\-img\-lg)? ?(.*?)".*?<\/svg>\n` `<img src="..." class="$1" alt="...">` $input -}}
    {{- $content = replaceRE ` (class=" *?")` "" $content -}}
      <div class="code-syntax-wrapper">
        <div class="relative border-gray-200 border-y border-x code-syntax dark:border-gray-600">
            <div class="grid w-full grid-cols-2 border-b border-gray-200 bg-gray-50 rounded-t-md dark:bg-gray-700 dark:border-gray-600">
              <ul class="flex text-sm font-medium text-center text-gray-500 dark:text-gray-400">
                <li>
                  <button type="button" data-toggle-html-code class="inline-block w-full p-2 px-3 text-gray-800 bg-gray-100 hover:bg-gray-200 dark:hover:bg-gray-700 border-r border-gray-200 dark:text-white dark:bg-gray-800 dark:border-gray-600">HTML</button>
                </li>
                {{ if $javascript }}
                  <li>
                    <button type="button" data-toggle-javascript-code class="inline-block w-full p-2 px-3 text-gray-800 bg-gray-100 hover:bg-gray-200 dark:hover:bg-gray-700 border-r border-gray-200 dark:text-white dark:bg-gray-800 dark:border-gray-600">JavaScript</button>
                  </li>
                {{ end }}
              </ul>
              <div class="flex justify-end">
                <button {{ if $id }} data-tooltip-target="{{ $id }}-copy-clipboard-tooltip" data-clipboard-content-type="html" data-tooltip-placement="bottom"{{ end }} type="button" data-copy-state="copy" class="flex items-center px-3 py-2 text-xs font-medium text-gray-600 bg-gray-100 border-l border-gray-200 dark:border-gray-600 dark:text-gray-400 dark:bg-gray-800 hover:text-blue-700 dark:hover:text-white copy-to-clipboard-button">
                  <svg class="w-3.5 h-3.5 mr-2" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 18 20">
                    <path d="M5 9V4.13a2.96 2.96 0 0 0-1.293.749L.879 7.707A2.96 2.96 0 0 0 .13 9H5Zm11.066-9H9.829a2.98 2.98 0 0 0-2.122.879L7 1.584A.987.987 0 0 0 6.766 2h4.3A3.972 3.972 0 0 1 15 6v10h1.066A1.97 1.97 0 0 0 18 14V2a1.97 1.97 0 0 0-1.934-2Z"/>
                    <path d="M11.066 4H7v5a2 2 0 0 1-2 2H0v7a1.969 1.969 0 0 0 1.933 2h9.133A1.97 1.97 0 0 0 13 18V6a1.97 1.97 0 0 0-1.934-2Z"/>
                  </svg> <span class="copy-text">Copy</span>
                </button>
                {{ if $id }}
                  <div id="{{ $id }}-copy-clipboard-tooltip" role="tooltip" class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white transition-opacity duration-300 bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700">
                      Copy to clipboard
                      <div class="tooltip-arrow" data-popper-arrow></div>
                  </div>
                {{ end }}
                <div class="hidden" data-clipboard-content-html="{{- $content -}}" data-clipboard-content-javascript="{{- $javascript -}}">
                  {{- $input -}}
                </div>
              </div>
            </div>
          <div class="relative">
            <div data-code-wrapper class="overflow-hidden max-h-72" tabindex="-1">
              <div data-code-wrapper-html>
                {{- highlight (trim $content "\n") $lang "" -}}
              </div>
              {{ if $javascript }}
                <div data-code-wrapper-javascript class="hidden">
                  {{- highlight (trim $javascript "\n") "javascript" "" -}}
                </div>
              {{ end }}
            </div>
            <button data-expand-code type="button" class="hidden absolute bottom-0 left-0 py-2.5 px-5 w-full text-sm font-medium text-gray-900 bg-gray-100 border-t border-gray-200 hover:bg-gray-100 hover:text-blue-700 dark:bg-gray-700 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700">Expand code</button>
          </div>
        </div>
      </div>
  {{- end -}}
  
</div>
